Method and apparatus for sample adaptive offset without sign coding

ABSTRACT

A method and apparatus for sample adaptive offset without sign coding. The method includes selecting an edge offset type for at least a portion of an image, classifying at least one pixel of at least the portion of the image into edge shape category, calculating an offset of the pixel, determining the offset is larger or smaller than a predetermined threshold, changing a sign of the offset based on the threshold determination; and performing entropy coding accounting for the sign of the offset and the value of the offset.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of application Ser. No. 15/008,888,filed Jan. 28, 2016, which is a continuation of application Ser. No.13/671,670, filed Nov. 8, 2012 (now U.S. Pat. No. 9,253,482), whichclaims the benefit of U.S. Provisional Application No. 61/557,040, filedNov. 8, 2011 and U.S. Provisional Application No. 61/585,806, filed Jan.12, 2012, all of which are incorporated herein by reference in theirentirety.

BACKGROUND OF THE INVENTION Field of the Invention

Embodiments of the present invention generally relate to a method andapparatus for sample adaptive offset without sign coding, which maybeused for high efficiency video coding.

Description of the Related Art

Sample adaptive offset (SAO) was introduced for the next generationvideo coding standard called high efficiency video coding (HEVC). FIG. 1is an embodiment depicting a block diagram for decoding Architecture ofhigh efficiency video coding with adaptive loop filtering (ALF) andsample adaptive offset. As shown in FIG. 1, SAO is applied afterdeblocking filtering process, usually, before adaptive loop filtering(ALF).

SAO involves adding an offset directly to the reconstructed pixel fromthe video decoder loop in FIG. 1. The offset value applied to each pixeldepends on the local characteristics surrounding that pixel. There aretwo kinds of offsets, namely band offset (BO) and edge offset (EO). BOclassifies pixels by intensity interval of the reconstructed pixel,while EO classifies pixels based on edge direction and structure. Incertain cases, the number of pixels increases but the number of bandsstays the same. As a result, the system becomes less efficient.

Therefore, there is a need for an improved method and/or apparatus for amore efficient image and video coding using hierarchical sample adaptiveband offset.

SUMMARY OF THE INVENTION

Embodiments of the present invention relate to a method and apparatusfor sample adaptive offset without sign coding. The method includesselecting an edge offset type for at least a portion of an image,classifying at least one pixel of at least the portion of the image intoedge shape category, calculating an offset of the pixel, determining theoffset is larger or smaller than a predetermined threshold, changing asign of the offset based on the threshold determination; and performingentropy coding accounting for the sign of the offset and the value ofthe offset.

BRIEF DESCRIPTION OF THE DRAWINGS

So that the manner in which the above recited features of the presentinvention can be understood in detail, a more particular description ofthe invention, briefly summarized above, may be had by reference toembodiments, some of which are illustrated in the appended drawings. Itis to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments.

FIG. 1 is an embodiment depicting a block diagram for decodingarchitecture of high efficiency video coding with adaptive loopfiltering and sample adaptive offset;

FIG. 2 is a block diagram of a digital system;

FIG. 3 is a block diagram of a video encoder;

FIG. 4 is a block diagram of a video decoder;

FIG. 5 is an embodiment depicting band offset group classification;

FIG. 6 is an embodiment depicting edge offset pixel classificationpatterns;

FIG. 7 is an embodiment depicting a flow diagram of a method forencoding procedure using a reconstructed signal;

FIG. 8 is an embodiment depicting a flow diagram for a method for regionadaptive offset compensation decoding; and

FIG. 9 is an embodiment depicting a flow diagram of a method for generalregion adaptive offset compensation encoding.

DETAILED DESCRIPTION

FIG. 2 is a block diagram of a digital system. FIG. 2 shows a blockdiagram of a digital system that includes a source digital system 200that transmits encoded video sequences to a destination digital system202 via a communication channel 216. The source digital system 200includes a video capture component 204, a video encoder component 206,and a transmitter component 208. The video capture component 204 isconfigured to provide a video sequence to be encoded by the videoencoder component 206. The video capture component 204 may be, forexample, a video camera, a video archive, or a video feed from a videocontent provider. In some embodiments, the video capture component 204may generate computer graphics as the video sequence, or a combinationof live video, archived video, and/or computer-generated video.

The video encoder component 206 receives a video sequence from the videocapture component 204 and encodes it for transmission by the transmittercomponent 208. The video encoder component 206 receives the videosequence from the video capture component 204 as a sequence of pictures,divides the pictures into largest coding units (LCUs), and encodes thevideo data in the LCUs. An embodiment of the video encoder component 206is described in more detail herein in reference to FIG. 3.

The transmitter component 208 transmits the encoded video data to thedestination digital system 202 via the communication channel 216. Thecommunication channel 216 may be any communication medium, orcombination of communication media suitable for transmission of theencoded video sequence, such as, for example, wired or wirelesscommunication media, a local area network, or a wide area network.

The destination digital system 202 includes a receiver component 210, avideo decoder component 212 and a display component 214. The receivercomponent 210 receives the encoded video data from the source digitalsystem 200 via the communication channel 216 and provides the encodedvideo data to the video decoder component 212 for decoding. The videodecoder component 212 reverses the encoding process performed by thevideo encoder component 206 to reconstruct the LCUs of the videosequence.

The reconstructed video sequence is displayed on the display component214. The display component 214 may be any suitable display device suchas, for example, a plasma display, a liquid crystal display (LCD), alight emitting diode (LED) display, etc.

In some embodiments, the source digital system 200 may also include areceiver component and a video decoder component and/or the destinationdigital system 202 may include a transmitter component and a videoencoder component for transmission of video sequences both directionsfor video steaming, video broadcasting, and video telephony. Further,the video encoder component 206 and the video decoder component 212 mayperform encoding and decoding in accordance with one or more videocompression standards. The video encoder component 206 and the videodecoder component 212 may be implemented in any suitable combination ofsoftware, firmware, and hardware, such as, for example, one or moredigital signal processors (DSPs), microprocessors, discrete logic,application specific integrated circuits (ASICs), field-programmablegate arrays (FPGAs), etc.

FIG. 3 is a block diagram of a video encoder. FIG. 3 shows a blockdiagram of the LCU processing portion of an example video encoder. Acoding control component (not shown) sequences the various operations ofthe LCU processing, i.e., the coding control component runs the maincontrol loop for video encoding. The coding control component receives adigital video sequence and performs any processing on the input videosequence that is to be done at the picture level, such as determiningthe coding type (I, P, or B) of a picture based on the high level codingstructure, e.g., IPPP, IBBP, hierarchical-B, and dividing a picture intoLCUs for further processing. The coding control component also maydetermine the initial LCU CU structure for each CU and providesinformation regarding this initial LCU CU structure to the variouscomponents of the video encoder as needed. The coding control componentalso may determine the initial prediction unit and TU structure for eachCU and provides information regarding this initial structure to thevarious components of the video encoder as needed.

The LCU processing receives LCUs of the input video sequence from thecoding control component and encodes the LCUs under the control of thecoding control component to generate the compressed video stream. TheCUs in the CU structure of an LCU may be processed by the LCU processingin a depth-first Z-scan order. The LCUs 300 from the coding control unitare provided as one input of a motion estimation component 320, as oneinput of an intra-prediction component 324, and to a positive input of acombiner 302 (e.g., adder or subtractor or the like). Further, althoughnot specifically shown, the prediction mode of each picture as selectedby the coding control component is provided to a mode selector componentand the entropy encoder 334.

The storage component 318 provides reference data to the motionestimation component 320 and to the motion compensation component 322.The reference data may include one or more previously encoded anddecoded CUs, i.e., reconstructed CUs.

The motion estimation component 320 provides motion data information tothe motion compensation component 322 and the entropy encoder 334. Morespecifically, the motion estimation component 320 performs tests on CUsin an LCU based on multiple inter-prediction modes (e.g., skip mode,merge mode, and normal or direct inter-prediction) and transform blocksizes using reference picture data from storage 318 to choose the bestmotion vector(s)/prediction mode based on a rate distortion coding cost.To perform the tests, the motion estimation component 320 may begin withthe CU structure provided by the coding control component. The motionestimation component 320 may divide each CU indicated in the CUstructure into prediction units according to the unit sizes ofprediction modes and into transform units according to the transformblock sizes and calculate the coding costs for each prediction mode andtransform block size for each CU. The motion estimation component 320may also compute CU structure for the LCU and PU/TU partitioningstructure for a CU of the LCU by itself.

For coding efficiency, the motion estimation component 320 may alsodecide to alter the CU structure by further partitioning one or more ofthe CUs in the CU structure. That is, when choosing the best motionvectors/prediction modes, in addition to testing with the initial CUstructure, the motion estimation component 320 may also choose to dividethe larger CUs in the initial CU structure into smaller CUs (within thelimits of the recursive quadtree structure), and calculate coding costsat lower levels in the coding hierarchy. If the motion estimationcomponent 320 changes the initial CU structure, the modified CUstructure is communicated to other components that need the information.

The motion estimation component 320 provides the selected motion vector(MV) or vectors and the selected prediction mode for eachinter-predicted prediction unit of a CU to the motion compensationcomponent 322 and the selected motion vector (MV), reference pictureindex (indices), prediction direction (if any) to the entropy encoder334

The motion compensation component 322 provides motion compensatedinter-prediction information to the mode decision component 326 thatincludes motion compensated inter-predicted PUs, the selectedinter-prediction modes for the inter-predicted PUs, and correspondingtransform block sizes. The coding costs of the inter-predictedprediction units are also provided to the mode decision component 326.

The intra-prediction component 324 provides intra-prediction informationto the mode decision component 326 that includes intra-predictedprediction units and the corresponding intra-prediction modes. That is,the intra-prediction component 324 performs intra-prediction in whichtests based on multiple intra-prediction modes and transform unit sizesare performed on CUs in an LCU using previously encoded neighboringprediction units from the buffer 328 to choose the best intra-predictionmode for each prediction unit in the CU based on a coding cost.

To perform the tests, the intra-prediction component 324 may begin withthe CU structure provided by the coding control. The intra-predictioncomponent 324 may divide each CU indicated in the CU structure intoprediction units according to the unit sizes of the intra-predictionmodes and into transform units according to the transform block sizesand calculate the coding costs for each prediction mode and transformblock size for each PU. For coding efficiency, the intra-predictioncomponent 324 may also decide to alter the CU structure by furtherpartitioning one or more of the CUs in the CU structure. That is, whenchoosing the best prediction modes, in addition to testing with theinitial CU structure, the intra-prediction component 324 may also choseto divide the larger CUs in the initial CU structure into smaller CUs(within the limits of the recursive quadtree structure), and calculatecoding costs at lower levels in the coding hierarchy. If theintra-prediction component 324 changes the initial CU structure, themodified CU structure is communicated to other components that need theinformation. Further, the coding costs of the intra-predicted predictionunits and the associated transform block sizes are also provided to themode decision component 326.

The mode decision component 326 selects between the motion-compensatedinter-predicted prediction units from the motion compensation component322 and the intra-predicted prediction units from the intra-predictioncomponent 324 based on the coding costs of the prediction units and thepicture prediction mode provided by the mode selector component. Thedecision is made at CU level. Based on the decision as to whether a CUis to be intra- or inter-coded, the intra-predicted prediction units orinter-predicted prediction units are selected, accordingly.

The output of the mode decision component 326, i.e., the predicted PU,is provided to a negative input of the combiner 302 and to a delaycomponent 330. The associated transform block size is also provided tothe transform component 304. The output of the delay component 330 isprovided to another combiner (i.e., an adder) 338. The combiner 302subtracts the predicted prediction unit from the current prediction unitto provide a residual prediction unit to the transform component 304.The resulting residual prediction unit is a set of pixel differencevalues that quantify differences between pixel values of the originalprediction unit and the predicted PU. The residual blocks of all theprediction units of a CU form a residual CU block for the transformcomponent 304.

The transform component 304 performs block transforms on the residual CUto convert the residual pixel values to transform coefficients andprovides the transform coefficients to a quantize component 306. Thetransform component 304 receives the transform block sizes for theresidual CU and applies transforms of the specified sizes to the CU togenerate transform coefficients.

The quantize component 306 quantizes the transform coefficients based onquantization parameters (QPs) and quantization matrices provided by thecoding control component and the transform sizes. The quantize component306 may also determine the position of the last non-zero coefficient ina TU according to the scan pattern type for the TU and provide thecoordinates of this position to the entropy encoder 334 for inclusion inthe encoded bit stream. For example, the quantize component 306 may scanthe transform coefficients according to the scan pattern type to performthe quantization, and determine the position of the last non-zerocoefficient during the scanning/quantization.

The quantized transform coefficients are taken out of their scanordering by a scan component 308 and arranged sequentially for entropycoding. The scan component 308 scans the coefficients from the highestfrequency position to the lowest frequency position according to thescan pattern type for each TU. In essence, the scan component 308 scansbackward through the coefficients of the transform block to serializethe coefficients for entropy coding. As was previously mentioned, alarge region of a transform block in the higher frequencies is typicallyzero. The scan component 308 does not send such large regions of zerosin transform blocks for entropy coding. Rather, the scan component 308starts with the highest frequency position in the transform block andscans the coefficients backward in highest to lowest frequency orderuntil a coefficient with a non-zero value is located. Once the firstcoefficient with a non-zero value is located, that coefficient and allremaining coefficient values following the coefficient in the highest tolowest frequency scan order are serialized and passed to the entropyencoder 334. In some embodiments, the scan component 308 may beginscanning at the position of the last non-zero coefficient in the TU asdetermined by the quantize component 306, rather than at the highestfrequency position.

The ordered quantized transform coefficients for a CU provided via thescan component 308 along with header information for the CU are coded bythe entropy encoder 334, which provides a compressed bit stream to avideo buffer 336 for transmission or storage. The header information mayinclude the prediction mode used for the CU. The entropy encoder 334also encodes the CU and prediction unit structure of each LCU.

The LCU processing includes an embedded decoder. As any compliantdecoder is expected to reconstruct an image from a compressed bitstream, the embedded decoder provides the same utility to the videoencoder. Knowledge of the reconstructed input allows the video encoderto transmit the appropriate residual energy to compose subsequentpictures. To determine the reconstructed input, i.e., reference data,the ordered quantized transform coefficients for a CU provided via thescan component 308 are returned to their original post-transformarrangement by an inverse scan component 310, the output of which isprovided to a dequantize component 312, which outputs a reconstructedversion of the transform result from the transform component 304.

The dequantized transform coefficients are provided to the inversetransform component 314, which outputs estimated residual informationwhich represents a reconstructed version of a residual CU. The inversetransform component 314 receives the transform block size used togenerate the transform coefficients and applies inverse transform(s) ofthe specified size to the transform coefficients to reconstruct theresidual values.

The reconstructed residual CU is provided to the combiner 338. Thecombiner 338 adds the delayed selected CU to the reconstructed residualCU to generate an unfiltered reconstructed CU, which becomes part ofreconstructed picture information. The reconstructed picture informationis provided via a buffer 328 to the intra-prediction component 324 andto an in-loop filter component 316. The in-loop filter component 316applies various filters to the reconstructed picture information toimprove the reference picture used for encoding/decoding of subsequentpictures. The in-loop filter component 316 may, for example, adaptivelyapply low-pass filters to block boundaries according to the boundarystrength to alleviate blocking artifacts causes by the block-based videocoding. The filtered reference data is provided to storage component318.

FIG. 4 shows a block diagram of an example video decoder. The videodecoder operates to reverse the encoding operations, i.e., entropycoding, quantization, transformation, and prediction, performed by thevideo encoder of FIG. 3 to regenerate the pictures of the original videosequence. In view of the above description of a video encoder, one ofordinary skill in the art will understand the functionality ofcomponents of the video decoder without detailed explanation.

The entropy decoding component 400 receives an entropy encoded(compressed) video bit stream and reverses the entropy coding to recoverthe encoded PUs and header information such as the prediction modes andthe encoded CU and PU structures of the LCUs. If the decoded predictionmode is an inter-prediction mode, the entropy decoder 400 thenreconstructs the motion vector(s) as needed and provides the motionvector(s) to the motion compensation component 410.

The inverse scan and inverse quantization component 402 receives entropydecoded quantized transform coefficients from the entropy decodingcomponent 400, inverse scans the coefficients to return the coefficientsto their original post-transform arrangement, i.e., performs the inverseof the scan performed by the scan component 308 of the encoder toreconstruct quantized transform blocks, and de-quantizes the quantizedtransform coefficients. The forward scanning in the encoder is aconversion of the two dimensional (2D) quantized transform block to aone dimensional (1D) sequence; the inverse scanning performed here is aconversion of the 1D sequence to the two dimensional quantized transformblock using the same scanning pattern as that used in the encoder.

The inverse transform component 404 transforms the frequency domain datafrom the inverse scan and inverse quantization component 402 back to theresidual CU. That is, the inverse transform component 404 applies aninverse unit transform, i.e., the inverse of the unit transform used forencoding, to the de-quantized residual coefficients to produce theresidual CUs.

A residual CU supplies one input of the addition component 406. Theother input of the addition component 406 comes from the mode switch408. When an inter-prediction mode is signaled in the encoded videostream, the mode switch 408 selects predicted PUs from the motioncompensation component 410 and when an intra-prediction mode issignaled, the mode switch selects predicted PUs from theintra-prediction component 414.

The motion compensation component 410 receives reference data fromstorage 412 and applies the motion compensation computed by the encoderand transmitted in the encoded video bit stream to the reference data togenerate a predicted PU. That is, the motion compensation component 410uses the motion vector(s) from the entropy decoder 400 and the referencedata to generate a predicted PU.

The intra-prediction component 414 receives reference data frompreviously decoded PUs of a current picture from the picture storage 412and applies the intra-prediction computed by the encoder as signaled bythe intra-prediction mode transmitted in the encoded video bit stream tothe reference data to generate a predicted PU.

The addition component 406 generates a decoded CU by adding thepredicted PUs selected by the mode switch 408 and the residual CU. Theoutput of the addition component 406 supplies the input of the in-loopfilter component 416. The in-loop filter component 416 performs the samefiltering as the encoder. The output of the in-loop filter component 416is the decoded pictures of the video bit stream. Further, the output ofthe in-loop filter component 416 is stored in storage 412 to be used asreference data.

There are two kinds of offsets, namely band offset (BO) and edge offset(EO). BO classifies pixels by intensity interval of the reconstructedpixel, while EO classifies pixels based on edge direction and structure.For BO, the pixel is classified into one of two categories, the sideband or central band, as shown in FIG. 5. FIG. 5 is an embodimentdepicting band offset group classification.

FIG. 6 is an embodiment depicting edge offset pixel classificationpatterns. For edge offset, the pixels can be filtered in one of fourdirections, as shown in FIG. 6. For each direction, the pixel isclassified into one of five categories based on the value of c, where cis the intensity value of the current reconstructed pixel. The categorynumber can be calculated as sign(p0−p1)+sign (p0−p2), where p0 iscurrent pixel and p1 and p2 are neighboring pixels.

c<2 neighboring pixels;

c<1 neighbor && c==1 neighbor;

c>1 neighbor && c==1 neighbor;

c>2 neighbors; and

none of above (c=either neighbor).

On the encoder side, the SAO is LCU-based processing to estimate theoffsets for a LCU. Each LCU is allowed to switch between BO and EO.Thus, the encoder can signal the following to the decoder for a LCU:

sao_type_idx=type of SAO

sao offset=sao offset value

Table 1 describes in more detail type of SAO or speciation ofNumSaoClass:

TABLE 1 sao_type_idx NumSaoCategory Edge type (informative) 0 0 Notapplied 1 4 1D 0-degree edge 2 4 1D 90-degree edge 3 4 1D 135-degreeedge 4 4 1D 45-degree edge 5 16 Central band 6 16 Side bandFor each LCU, a sao_type_idx is signaled followed by offset values foreach category.

In one embodiment, a method and/or apparatus compensates forquantization error using the reconstructed signal by adding offset toeach pixel. FIG. 7 is an embodiment depicting a flow diagram of a method700 for encoding procedure using a reconstructed signal. The methodstarts at step 702 and proceeds to step 704. At step 704, the method 700selects the type for a give region (e.g. LCU). At step 706, the method700 classifies each pixel into categories. At step 708, the method 700calculates the offset. At step 710, the method 700 determines if thecategory is positive. If the category is positive, the method 700proceeds to step 712, wherein the method 700 determines if the offset isless than zero. If the offset is less than zero, the method 700 proceedsto step 714, wherein the offset is set to zero and proceeds to step 716.If the offset is not less than zero, the method 700 proceeds to step716.

If the category is determined to be not positive in step 710, the methodproceeds to step 718, wherein the method 700 determines if the offset isgreater than zero. If the offset is greater than zero, the method 700proceeds to step 714 wherein the offset is set to zero and the method700 proceeds to step 716. If the offset is not greater than zero, themethod 700 proceeds to step 720, wherein the offset is set to a negativevalue and the method 700 proceeds to step 716. At step 716, the method700 performs determines the entropy coding of offset information. Themethod 700 ends at step 722. Steps 708-716 maybe performed for eachcategory.

As shown in FIG. 7, an image or a video frame is divided into regions. Aquad-tree structure can be used to divide regions. Or a fixed-sizeblock, e.g., LCU, can be used. For each region edge offset type isselected according to edge structure in the region. Each pixel isclassified into predefined categories. The category is defined accordingto the sign of difference between the current reconstructed pixel valueand that of neighboring ones as described in the previous section. Theoffset for each category can be calculated by taking the average ofdifferences between the original pixel and the reconstructed one whichfall into each category.

Accordingly, the level of the current pixel and neighboring pixel willform different shapes for each category, as shown in FIG. 6. In case ofcategory 1 and category 2, the level of current pixel is lower than theneighboring ones. Therefore, the offset value tends to have plus sign.On the other hand, in case of category 3 and 4, the level of currentpixel is higher than the neighboring ones. Therefore, the offset valuetends to have minus sign. However, when the sign of the offset isreversed, this means that the difference between the current pixel andneighboring ones becomes larger, which may potentially cause visualartifact. Thus, the sign of the offset is restricted according tocategory. Specifically, for category 1 and 2, or “+” category, theoffset is set larger than or equal to 0. If it is smaller than 0, it isset to 0. On the other hand, category 3 and 4, or “−” category, theoffset is set as 0 or negative one. If it is larger than 0, it is set to0. In this way, the visual artifact can be effectively removed.

Since the sign is determined according to category, there is usually noneed to include sign information into bitstream. Therefore, the absolutevalue of the sign is usually entropy coded. Hence, avoiding the use ofcoding sign information, coding efficiency improvement is achieved. Inone embodiment, such a solution may be used with band offset, in whichsign value may be coded and included into bitstream.

FIG. 8 is an embodiment depicting a flow diagram for a method for regionadaptive offset compensation decoding. The method 800 starts at step 802and proceeds to step 804, wherein the method 800 determines the entropycoding of type information for a given region. At step 806, the method800 determines the entropy coding of offset information. At step 808,the method 800 determines if the category is positive. If the categoryis positive, the method 800 proceeds to step to step 812. If thecategory is not positive, the method 800 proceeds to step 810 and thenproceeds to step 812. At 810, the method 800 sets the offset to anegative value. At step 812, the method 800 adds the offset to eachpixel according to the category. The method 800 ends at step 814. Steps806-810 maybe performed for each category.

In one embodiment, after decoding offset value for each category, itssign is determined according to the category. For “+” category offset,there is no sign change. For “−” category offset, the decoded value isconverted into negative one with same absolute value. Usually, afterderiving the offset values, the value is added to the reconstructedpixel value according to its category.

In one embodiment, such a solution may be incorporated into an encoderwith sign coding. For example, for “+” category offset, the offsetvalues may be restricted to be in the range of [0, max_abs_offset] inthe encoder side, where max_abs_offset is the maximum absolute value ofoffset allowed in the encoder side. Hence, a “+” sign is usuallyencoded. On the contrary, for “−” category offset, the offset values maybe restricted to be in the range of [−max_abs_offset, 0] and usuallyencode a “−” sign.

In general, other restriction may be imposed on the range of offsetvalues, for example, [−c, max_abs_offset] and [−max_abs_offset, c] for“+” category and “−” category, respectively, where c is zero or positivevalue (much) less than max_abs_offset.

FIG. 9 is an embodiment depicting a flow diagram of a method 900 forgeneral region adaptive offset compensation encoding. Method 900 startsat step 902 and proceeds to step 904. At step 904, the method 900selects a type for a region. At step 906, the method 900 calculates theoffset. At step 910, the method 900 determines if the category ispositive. If the category is not positive, the method 900 proceeds tostep 912, wherein the method 900 determines if the offset is greaterthan a positive value of a threshold. If the offset is greater, then themethod 900 proceeds to step 914, wherein the offset is set to be apositive value of the threshold and proceeds to step 920. If it is notgreater, the method 900 proceeds to step 920. If the category ispositive, the method 900 proceeds to step 916, wherein the method 900determines if the offset is less than a negative value of the threshold.If the offset is less, then the method 900 proceeds to step 918, whereinthe offset is set to be a negative value of the threshold and proceedsto step 920. If it is not less, the method 900 proceeds to step 920. Atstep 920, the method 900 determines the entropy coding of sign and theabsolute value of the offset. The method 900 ends at step 922.

While the foregoing is directed to embodiments of the present invention,other and further embodiments of the invention may be devised withoutdeparting from the basic scope thereof, and the scope thereof isdetermined by the claims that follow.

What is claimed is:
 1. A method of a digital processor for sampleadaptive offset without sign coding, comprising: entropy decoding of atype information for at least a portion of an image; entropy coding ofoffset information of the at least the portion of the image; adjustingthe offset to at least one pixel of the at least the portion of theimage accounting for a positive and negative offset.
 2. The method ofclaim 1, wherein the offset is limited according to threshold.
 3. Themethod of claim 1, wherein a negative offset is ignored.
 4. A method ofa digital processor for sample adaptive offset without sign coding,comprising: selecting an edge offset type for at least a portion of animage; classifying at least one pixel of at least the portion of theimage into edge shape category; calculating an offset of the pixel;determining the offset is larger or smaller than a predeterminedthreshold; changing a sign of the offset based on the thresholddetermination; and performing entropy coding accounting for the sign ofthe offset and the value of the offset.
 5. The method of claim 4,wherein the offset is set to zero when the offset is the same value asthe threshold.
 6. The method of claim 4, wherein the threshold is zero.7. A decoder for sample adaptive offset without sign coding, comprising:means for selecting an edge offset type for at least a portion of animage; means for classifying at least one pixel of at least the portionof the image into edge shape category; means for calculating an offsetof the pixel; means for determining the offset is larger or smaller thana predetermined threshold; means for changing a sign of the offset basedon the threshold determination; and means for performing entropy codingaccounting for the sign of the offset and the value of the offset. 8.The decoder of claim 7, wherein the offset is set to zero when theoffset is the same value as the threshold.
 9. The decoder of claim 7,wherein the threshold is zero.